package com.edu.controller;

import com.edu.bean.User;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Locale;

/*
 * @Author:princess
 * @Date 2023/12/4 12 04 18:44
 *
 */
@Controller
public class I18nController {
    //只是为了跳转到 login.jsp页面
    @RequestMapping("/login")
    public String login(Locale locale){
        return "login";
    }

    //只是为了跳转到 register.jsp页面
    @RequestMapping("/register")
    public String register(User user, Model model){
        model.addAttribute("user",user);
        return "register";
    }
}
